package db.pojo;

import java.util.*;
import java.text.SimpleDateFormat;
import db.ext.EausersubinfoExt;
@SuppressWarnings("unchecked")
/**
 * eausersubinfo
 */
public class Eausersubinfo {
	/**
	 * USERID
	 */
	public String uSERID;
	/**
	 * THEME
	 */
	public String tHEME;
	/**
	 * LAYOUT
	 */
	public String lAYOUT;
	/**
	 * BACKGROUND
	 */
	public String bACKGROUND;
	SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
	public static EausersubinfoExt DB = new EausersubinfoExt(); 
	
	public Eausersubinfo() {
		super();
	}
	
	public Eausersubinfo(String uSERID, String tHEME, String lAYOUT, String bACKGROUND) {
		super();
		this.uSERID = uSERID; 
		this.tHEME = tHEME; 
		this.lAYOUT = lAYOUT; 
		this.bACKGROUND = bACKGROUND; 
	}
	
	public String getUSERID() {
		return uSERID;
	}

	public void setUSERID(String uSERID) {
		this.uSERID = uSERID;
	} 
	
	public String getTHEME() {
		return tHEME;
	}

	public void setTHEME(String tHEME) {
		this.tHEME = tHEME;
	} 
	
	public String getLAYOUT() {
		return lAYOUT;
	}

	public void setLAYOUT(String lAYOUT) {
		this.lAYOUT = lAYOUT;
	} 
	
	public String getBACKGROUND() {
		return bACKGROUND;
	}

	public void setBACKGROUND(String bACKGROUND) {
		this.bACKGROUND = bACKGROUND;
	} 
	
	
	public Map eausersubinfoToMap() {
		Map map = new HashMap();
		try {
			map.put("uSERID",this.uSERID);
			map.put("tHEME",this.tHEME);
			map.put("lAYOUT",this.lAYOUT);
			map.put("bACKGROUND",this.bACKGROUND);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return map;
	}

	public Eausersubinfo mapToEausersubinfo(Map map){
		try {
			String uSERID =  map.get("uSERID").toString();
			String tHEME =  map.get("tHEME").toString();
			String lAYOUT =  map.get("lAYOUT").toString();
			String bACKGROUND =  map.get("bACKGROUND").toString();
			Eausersubinfo eausersubinfo = new Eausersubinfo(uSERID, tHEME, lAYOUT, bACKGROUND);
			return eausersubinfo;
		} catch (Exception e) {
			e.printStackTrace();
			return null;
		}
	} 
	
	public String toString(){
		return eausersubinfoToMap().toString();
	}
	
	//方便数据操作	
	public Eausersubinfo insert(){
		return DB.insert(this);
	}
	public Eausersubinfo update(){
		return DB.update(this);
	}
	
	public int delete(){
		return DB.delete(this);
	}
	
}
